@space: 24px;
@border_light: var(--bd);
@border_dark: var(--bd);

.modalDefault() {
  :global {
    .ant-modal-header {
      padding-top: 18px;
      padding-bottom: 0;
      border-bottom: 0;
    }
    .ant-modal-body {
      padding: @space;
    }
    .ant-modal-footer {
      padding: @space;
      padding-top: 0;
      border-top: 0;
    }
    .ant-btn + .ant-btn:not(.ant-dropdown-trigger) {
      margin-left: 16px;
    }
  }
}

.modal {
  .modalDefault();
  .modal_title {
    display: flex;
    align-items: center;
    height: 30px;
    padding-left: 37px;
    font-weight: 500;
    font-size: 18px;
    line-height: 1;
    background-image: url('~@/assets/img/plan_icon.png');
    background-repeat: no-repeat;
    background-size: 30px 30px;
  }

  .modal_body {
    display: flex;
    width: 100%;
    height: 328px;
    overflow: hidden;
    border: 1px solid @border_light;
    border-radius: 4px;

    .treebox,
    .choosebox {
      display: flex;
      flex: 1;
      flex-direction: column;
      padding: 16px 0;
      overflow: hidden;
    }
    .treebox {
      border-right: 1px solid @border_light;
    }
    .box_header {
      height: 32px;
      margin-bottom: 8px;
      padding: 0 16px;
    }
    .box_content {
      flex: 1;
      padding: 0 16px;
      overflow-y: auto;
    }
    .choosebox {
      .box_header {
        display: flex;
        align-items: center;
        justify-content: space-between;
      }
    }
    .chooseList {
      margin: 0;
      padding: 0;
      color: var(--font);
      list-style: none;
      > li {
        display: flex;
        align-items: center;
        justify-content: space-between;
        .chooseName {
          flex: 1;
          overflow: hidden;
        }
      }
    }
    .close {
      width: 16px;
      height: 16px;
      color: var(--font3);
      &:hover {
        color: #ff4d4f;
      }
    }
    .clear {
      color: var(--font2);
      cursor: pointer;
      &:hover {
        color: #ff4d4f;
      }
    }
  }

  .foot {
    width: 80px;
    font-weight: 500;
    font-size: 12px;
    border-radius: 5px;
  }

  // .search_act {
  //   color: #18a0fb;
  // }
}

html[data-type-color='gre'] {
  .modal {
    .modal_title {
      background-image: url('~@/assets/img/plan_icon_gre.png');
    }
  }
}

html[data-type-color='dark'] {
  .modal {
    // :global {
    // .ant-btn-primary {
    //   background: #18a0fb !important;
    // }
    // }
    .modalDefault();
    .modal_title {
      background-image: url('~@/assets/img/plan_icon_dark.png');
    }
    // .modal_body {
    //   border-color: @border_dark;
    //   .treebox {
    //     border-color: @border_dark;
    //   }
    //   .chooseList {
    //     color: #fff;
    //   }
    //   .close {
    //     color: #d8d8d8;
    //   }
    //   .clear {
    //     color: #fff;
    //   }
    // }
  }
}
